package com.cswangdao.threadlocal;


import java.util.Map;

public class BaseContext {
    public static ThreadLocal<Integer> threadLocal = new ThreadLocal<>();

    public static void setUserId(Integer userId) {
        threadLocal.set(userId);
    }

    public static Integer getUserId() {
        return threadLocal.get();
    }

    public static void remove() {
        threadLocal.remove();
    }

}
